package org.example.course.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Classname DataGridView
 * @Description 数据表返回
 * @Date 2020/4/21 14:41
 * @Created by
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DataGridView {
    private Integer code = 0;
    private String msg = "";
    private Long count;
    private Object data;

    /**
     * "totalRow": {
     * "字段1": "666"
     * ,"字段3": "999"
     * }
     */
    private Object totalRow;


    public DataGridView(Long count, Object date) {
        this.count = count;
        this.data = date;
    }

    public DataGridView(Long count, Object date, Object totalRow) {
        this.count = count;
        this.data = date;
        this.totalRow = totalRow;
    }

    public DataGridView(Object date) {
        this.data = date;
    }


    public DataGridView(Object date, Object totalRow) {
        this.data = date;
        this.totalRow = totalRow;
    }

    public DataGridView(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public DataGridView(Integer code, String msg, Object totalRow) {
        this.code = code;
        this.msg = msg;
        this.totalRow = totalRow;
    }
}
